<?php include('main.php'); ?>

<?php if (isset($this->session->userdata['user_login'])) { ?>
    <?php
    echo '<span style="color:red;">' . validation_errors() . '</span>';
    ?>

    <label class="contactform"><strong>Your Posted:</strong></label>
    <table class="table table-bordered table-striped">
        <?php
        if ($your_post->num_rows() > 0) {
            foreach ($your_post->result() as $row) {
                ?>


                <tr>
                    <td><i>Your have post => </i><?php echo "<strong>" . $row->title . "</strong>"; ?></td>
                    <td>
                        <?php echo '<a href=' . site_url('act/post_detail') . '/' . $row->ID . '></i>View Detail</a>' ?>


                </tr>

                        <?php
                    }
                }else{
					echo "<h3>No record found</h3>";
				}
                ?>
    </table>

    <label class="contactform"><strong>Your replied:</strong></label>
    <table class="table table-bordered table-striped">

        <?php
        if ($your_reply->num_rows() > 0) {
            foreach ($your_reply->result() as $row) {
                ?>


                <tr>
                    <td><i>You had replied to => </i> <?php echo "<strong>" . $row->thread_title . "</strong>"; ?></td>
                    <th><?php echo '<a href=' . site_url('act/reply_detail') . '/' . $row->rep_id . '></i>View Detail</a>' ?></th>
                </tr>

                        <?php
                    }
                }else{
					echo "No record found";
				}
                ?>
    </table>       

    <?php
} else {
    redirect(base_url());
}
?>
		 